package com.recipedb.recipedb.repository;

import com.recipedb.recipedb.entity.RecipeCommentLike;
import com.recipedb.recipedb.entity.RecipeCommentLikeId;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RecipeCommentLikeRepository extends JpaRepository<RecipeCommentLike, RecipeCommentLikeId> {
    /*// 根据评论ID查询所有点赞记录
    List<RecipeCommentLike> findByCommentId(Long commentId);
*/
    // 按点赞时间降序（最新的点赞排在前面）
    List<RecipeCommentLike> findByCommentIdOrderByCreatedAtDesc(Long commentId);

}
